<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title>种草技巧</title>
<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../../css/common.css" />
<style>
.item{
	height: 2.1rem;
	line-height: 2.1rem;
	padding: 0 0.8rem;
	border-bottom: 1px solid #eee;
}
.item .tit{
	font-size:0.7rem;
	color: #353336;
}

.info{
	font-size: 12px;
	color: #999999;
	letter-spacing: 0;
	line-height: 18px;
	background: #F6F7F7;
	padding: 0.8rem;
}
</style>
</head>
<body>
	<div class="aui-content">
			<div id="data_html"></div>
			<script type="text/x-dot-template" id="data_tpl">
			{{ for(var i in it){ }}
			<div class="item" tapmode onclick="onShow({{= it[i].help_id}})">
				<div class="tit right-arrow">{{= it[i].help_title}}</div>
			</div>
			{{ } }}
	    </script>
	</div>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
var title;
var type;				// 1 是 新手课堂     2 是 种草技巧
var data = {}
apiready = function(){
	api.parseTapmode();
	if(api.pageParam.title == '新手课堂'){
			type = 1
	}else if(api.pageParam.title == '种草技巧'){
			type = 2
	}
	api.ajax({
	    url: BASE_URL + 'App/Help/helpList',
	    method: 'post',
	    data: {
	        values: {
						type:type
	        }
	    }
	},function(ret, err){
	    if (ret) {
					data = ret.data
					var tpl = $$('#data_tpl').html();
					var tempFn = doT.template(tpl);
					$$('#data_html').html(tempFn(ret.data));
					api.parseTapmode();
	    } else {
	    }
	});

};
function onShow(id){
	// var txt = $$(el).text();
	var one = data.filter(function (e) { return e.help_id == id; });

	api.openWin({
			name: 'zc_xs_con_win',
			url: 'zc_xs_con_win.html',
			pageParam: {
					data:one[0],
					title:api.pageParam.title
			}
	});
}
</script>
</html>
